﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class WebControls : System.Web.UI.Page 
{
    int x; 
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Write("Button was cliecked");
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Write("Linkbutton was clicked");
    }

    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("ImageButton was clicked<br>");
        Response.Write(ImageButton1.ImageUrl.ToString());
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (hidx.Value != "")
            x = int.Parse(hidx.Value);
      
      
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        x =x +1;
        Response.Write(x.ToString());
        hidx.Value = x.ToString ();
    }
  
}
